<?php
namespace Conversation\Model\Entity;

use Zend\InputFilter\Factory as InputFactory;     // <-- Add this import
use Zend\InputFilter\InputFilter;                 // <-- Add this import
use Zend\InputFilter\InputFilterAwareInterface;   // <-- Add this import
use Zend\InputFilter\InputFilterInterface;        // <-- Add this import

class Conversation implements InputFilterAwareInterface
{

	public $subject;
    public $description;
    public $account_id;
    public $opportunity_id;


    public function exchangeArray($data)
    {
        //$this->id     = (isset($data['id'])) ? $data['id'] : null;
        $this->subject = (isset($data['name'])) ? $data['name'] : null;
        $this->description  = (isset($data['description'])) ? $data['description'] : null;
		$this->account_id  = (isset($data['account_id'])) ? $data['account_id'] : null;
		$this->opportunity_id  = (isset($data['opportunity_id'])) ? $data['opportunity_id'] : null;
		
    }
    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
	
	protected $inputFilter; 
    
    public function setInputFilter(InputFilterInterface $inputFilter) 
    { 
        throw new \Exception("Not used"); 
    } 
    
    public function getInputFilter() 
    { 
        if (!$this->inputFilter) 
        { 
            $inputFilter = new InputFilter(); 
            $factory = new InputFactory(); 
            
        
        $inputFilter->add($factory->createInput(array(
            'name' => 'name', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
           
        ))); 
 
        $inputFilter->add($factory->createInput(array(
            'name' => 'description', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'quantity', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
 
		$inputFilter->add($factory->createInput(array(
            'name' => 'type', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'pricefrequency', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
        
		$inputFilter->add($factory->createInput(array(
            'name' => 'ownedsecurableitem_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 

		$inputFilter->add($factory->createInput(array(
            'name' => 'account_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        )));
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'contact_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'opportunity_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
             
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'producttemplate_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'stage_customfield_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
             
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'sellprice_currencyvalue_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
        $this->inputFilter = $inputFilter;
        }

        return $this->inputFilter;
	}

    
       public function getSubject() {
        return $this->subject;
    }

    public function setSubject($subject) {
        $this->subject = $subject;
        return $this;
    }

    public function getDescription() {
        return $this->description;
    }

    public function setDescription($description) {
        $this->description = $description;
        return $this;
    }
	public function getAccount() {
        return $this->account_id;
    }

    public function setAccount($account_id) {
        $this->account_id = $account_id;
        return $this;
	}
	  
	public function getOpportunity() {
        return $this->opportunity_id;
    }

    public function setOpportunity($opportunity_id) {
        $this->opportunity_id = $opportunity_id;
        return $this;
    }
	
    
}
?>